package com.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 测试类属性校验
 */
@ApiModel(value = "测试类属性校验")
@Data
public class ClassPropties {

    @ApiModelProperty(value = "描述")
    @NotBlank(message = "描述不能为空")
    private String desc;

    /**
     * 定义类属性
     */
    @Valid
    @NotNull(message = "汽车类不能为空")
    @ApiModelProperty(value = "汽车类")
    private Car car; //关联Car类
}
